<%--
  Created by IntelliJ IDEA.
  User: zhuangjianhui_91
  Date: 2015/10/22
  Time: 1:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title></title>
</head>
<body>
<h3>fn:contains</h3>
<c:set var="theString" value="I am a test String"/>

<c:if test="${fn:contains(theString, 'test')}">
    <p>Found test string</p>
</c:if>

<c:if test="${fn:contains(theString, 'TEST')}">
    <p>Found TEST string</p>
</c:if>


<h3>fn ecapeXml</h3>
<c:set var="string1" value="This is first String."/>
<c:set var="string2" value="This <abc>is second String.</abc>"/>

<p>With escapeXml() Function:</p>

<p>string (1) : ${fn:escapeXml(string1)}</p>

<p>string (2) : ${fn:escapeXml(string2)}</p>

<p>Without escapeXml() Function:</p>

<p>string (1) : ${string1}</p>

<p>string (2) : ${string2}</p>
</body>
</html>
